package com.landeb.shop.huo.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by blade on 2016/10/26.
 */

public class ActGoodDetailFragAdapter extends FragmentPagerAdapter {

    private List<String> mTabList;
    private List<Fragment> mFragList;

    public ActGoodDetailFragAdapter(FragmentManager fm, List<String> tabList, List<Fragment> fragList) {
        super(fm);
        mTabList = tabList;
        mFragList = fragList;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragList.get(position);
    }

    @Override
    public int getCount() {
        return mFragList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTabList.get(position);
    }
}
